<template>
    <div>    
        <MySchool/>
        <MyStudent @studentClick="studentClick" @studentClick2="studentClick2"/>
    </div>
</template>

<script>
    import MySchool from "./components/MySchool"
    import MyStudent from "./components/MyStudent"
    export default {
        name:"App",
        components:{
            MySchool,
            MyStudent
        },
        methods:{
            //用...a接受后面的参数成1个数组
            studentClick(name,...params){
                console.log('student clicked',name,params)
            },
            studentClick2(name,...params){
                console.log('student clicked',name,params)
            }
        },
    }
</script>
